package com.lzh.demo;

import java.util.Scanner;

/**
 * @author liuzhihao
 * @create 2022-01-19 22:40
 */
public class demo3 {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();
        String[] s = input.split(" ");
        int N = Integer.parseInt(s[0]);
        int x = Integer.parseInt(s[1]);
        int[] arr;
        int max = 0;
        int count = 0;
        if (N > 0&& N <=100000 && x >= 0 && x <= 10000000) {
            arr = new int[N];
            String temp = sc.nextLine();
            String[] strings = temp.split(" ");
            for (int i=0; i < strings.length; i++) {
                for (int j = i; j < strings.length; j++) {
                    max += Integer.parseInt(strings[j]);
                    if (max >= x) {
                        count++;
                    }
                }
                max = 0;
            }
            System.out.println(count);
        }
    }

}
